package com.swotxu.oldwebproject.web.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Date: 2020/9/22 19:26
 * @Author: swotxu
 */
@Controller("helloController")
@RequestMapping("/test")
public class HelloWordController {
    private static final Logger log = LoggerFactory.getLogger(HelloWordController.class);
    public static void main(String[] args) {
        log.debug("debug");
        log.info("info");
        log.warn("warn");
    }

    @ResponseBody
    @RequestMapping("/hi")
    public String hello(){
        log.info("进入[hello]");
        return "hello word!";
    }
    @RequestMapping("/index")
    public String index(){
        log.info("进入[index]");
        return "index";
    }
}
